<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let name = prompt('你的名字：')
        let age = prompt('你的年龄：')
        let str = `你好，我叫${name}，今年${age}岁`
        alert(str)
        document.write(str)
    </script>
</body>
</html>